package dp;

import dp.Cercle;
import dp.Figure;
import dp.Point;

public class Application {

	public static void main(String[] args) throws CloneNotSupportedException {
		
		Figure f1 = new Cercle(new Point(10, 10), new Point(20, 20));
		Figure f2 = new dp.Rectangle(new Point(30, 30), new Point(40, 40));
		System.out.println("Surface de "+f1+" = " + f1.surface());
		System.out.println("Surface de "+f2+" = " + f2.surface());
		System.out.println();
		
		System.out.println("Copie de f1");
		Figure f3 = f1.clone();
		System.out.println("Surface de "+f3+" = " + f3.surface());
		System.out.println();
		
		System.out.println("Copie de f2");
		Figure f4 = f2.clone();
		System.out.println("Surface de "+f4+" = " + f4.surface());
		System.out.println();
		
		System.out.println("f1.p1.x = 60");
		f1.p1.x = 60;
		System.out.println("Surface de "+f1+" = " + f1.surface());
		System.out.println("Surface de "+f3+" = " + f3.surface());
	}
}
